package com.amoby.main.schedule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.amoby.main.service.PushSmsService;

@Component
public class PushDealOrdersTask {
    private static final Logger logger = LoggerFactory.getLogger(PushDealOrdersTask.class);
    @Autowired
    private PushSmsService     pushSmsService;

    @Scheduled(cron = "0 0/5 * * * ?")
    public void pushDealOrdersTask() {
        logger.debug("每5分钟定时检查交易短信发送失败进行第三方平台发送===========");
        try {
            pushSmsService.pushDealOrdersTask();
        } catch (Exception e) {
            logger.error("每5分钟定时检查交易短信发送失败进行第三方平台发送===========定时任务失败", e);
        }
    }

}
